package com.neustudy.base.exception;

import lombok.Data;

/**
 * @author WKX
 * @version 1.0
 * @describe todo
 * @create: 2024-11-08 18:03
 */
@Data
public class NeuStudyExecption extends RuntimeException{

    String errMessage;

    public NeuStudyExecption() {
        super();
    }

    public NeuStudyExecption(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public static void cast(String errmsg){
        throw new NeuStudyExecption(errmsg);
    }

    public static void cast(CommonError err){
        throw new NeuStudyExecption(err.getErrMessage());
    }

}
